<% if @collection.any? %>
  <div class="table-responsive" id="listing_gift_cards">
    <table class="table">
      <thead class="text-muted">
        <tr>
          <th scope="col"><%= Spree.t(:code) %></th>
          <th scope="col"><%= Spree.t(:amount) %></th>
          <th scope="col"><%= Spree.t(:used) %></th>
          <th scope="col"><%= Spree.t(:currency) %></th>
          <th scope="col"><%= Spree.t(:status) %></th>
          <th scope="col"><%= Spree.t(:expires_at) %></th>
          <th scope="col"><%= Spree.t(:customer) %></th>
        </tr>
      </thead>
      <tbody>
        <%= render collection: @collection, partial: 'spree/admin/gift_cards/gift_card' %>
      </tbody>
    </table>
  </div>
  <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
<% else %>
  <% new_object_url = @user.present? ? spree.new_admin_user_gift_card_path(@user) : spree.new_admin_gift_card_path %>
  <%= render 'spree/admin/shared/no_resource_found', model_class: Spree::GiftCard, new_object_url: new_object_url %>
<% end %>